<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
    <!--<meta name="description" content="">
    <meta name="author" content="黄建枫">-->
    <title>管理员模块教师管理端</title>
    <!-- Bootstrap core CSS -->
    <link href="../../static/css/bootstrap.min.css" rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}">
    <!-- Custom styles for this template -->
    <link href="../../static/css/dashboard.css" rel="stylesheet" th:href="@{/static/css/dashboard.css}">
</head>

<body>
<!--顶部导航栏-->
<div th:insert="admin/common::topbar"></div>
<div class="container-fluid">
    <div class="row">
        <!--侧边栏-->
        <div th:insert="~{admin/common::sidebar(active='teacherList.html')}"></div>
        <main class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4" role="main">
            <div class="row container-fluid">
                <a class="btn btn-info col-md-1 " th:href="@{/admin/toAddClassTeacher}">添加任职</a>
                <!--<a class="btn btn-success col-md-1 " th:href="@{/admin/getAllClassTeacher/{page}/(page=${1})}">任职详情</a>-->
                <a class="btn btn-success col-md-1" th:href="@{/admin/GetTeacher/{page}/(page=${1})}">教师详情</a>
                <form class="col-md-4 col-md-push-6" id="form" method="post"
                      th:action="@{/admin/getClassTeacherByClass/{page}/(page=${1})}">
                    <!--onblur 失去焦点产生事件-->
                    <div class="input-group">
                        <input class="form-control input-lg" id="classid" name="classid" onblur=""
                               oninput="value=value.replace(/[^\d]/g,'')" placeholder="按班级代号查询教师" type="text">
                        <!--<span class="input-group-addon btn btn-primary" id="submit">搜索</span>-->
                        <input class="input-group-addon btn btn-sm btn-primary" type="submit" value="搜索">
                    </div>
                </form>
            </div>

            <div class="table-responsive">
                <table class="table table-striped table-hover  table-sm">
                    <thead>
                    <tr>
                        <th>班级号</th>
                        <th>教师编号</th>
                        <th>教师姓名</th>
                        <th>教学课程</th>
                        <th>性别</th>
                        <th>教室地点</th>
                        <th>教学班级</th>
                        <th>教学课程数量</th>
                        <th>操作</th>
                        <!--<th>年级</th>-->
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="classTeacher:${classTeacherList}">
                        <td th:text="${classTeacher.classid}"></td>
                        <td th:text="${classTeacher.tid}"></td>
                        <td th:text="${classTeacher.tname}"></td>
                        <td th:text="${classTeacher.subject}"></td>
                        <td th:text="${classTeacher.gender}"></td>
                        <td th:text="${classTeacher.classroom}"></td>
                        <td th:text="${classTeacher.class_name}"></td>
                        <td th:text="${classTeacher.status}"></td>
                        <td>
                            <!--<a th:href="@{/admin/toUpdateTeacher/{id}/(id=${classTeacher.getTid()})}" class="btn btn-sm btn-primary">编辑</a>-->
                            <a class="btn btn-sm btn-danger"
                               th:href="@{/admin/toDeleteClassTeacher/{classId}/{tid}/{subject}(classId=${classTeacher.getClassid()},tid=${classTeacher.getTid()},subject=${classTeacher.getSubject()})}">删除</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <nav aria-label="Page navigation" class="page-header">
                <ul class="pagination">
                    <li>
                        <a aria-label="Previous" id="pagePrevious"
                           th:href="@{/admin/getAllClassTeacher/{page}/(page=${page}-1)}" th:if="${lastPage}">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li><a class="nav active" id="page1" th:href="@{/admin/getAllClassTeacher/{page}/(page=${page})}"
                           th:text="${page}"></a></li>
                    <li><a id="page2" th:href="@{/admin/getAllClassTeacher/{page}/(page=${page+1})}"
                           th:if="${number} gt ${page*10}" th:text="${page}+1"></a></li>
                    <li><a id="page3" th:href="@{/admin/getAllClassTeacher/{page}/(page=${page+2})}"
                           th:if="${number} gt ${(page+1)*10}" th:text="${page}+2"></a></li>
                    <li><a id="page4" th:href="@{/admin/getAllClassTeacher/{page}/(page=${page+3})}"
                           th:if="${number} gt ${(page+2)*10}" th:text="${page}+3"></a></li>
                    <li><a id="page5" th:href="@{/admin/getAllClassTeacher/{page}/(page=${page+4})}"
                           th:if="${number} gt ${(page+3)*10}" th:text="${page}+4"></a></li>
                    <li>
                        <a aria-label="Next" id="pageNext"
                           th:href="@{/admin/getAllClassTeacher/{page}/(page=${page}+1)}" th:if="${nextPage}">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </main>
    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../../static/js/jquery-3.6.0.min.js" th:src="@{/static/js/jquery-3.6.0.min.js}"
        type="text/javascript"></script>
<script src="../../static/js/popper.min.js" th:src="@{/static/js/popper.min.js}" type="text/javascript"></script>
<script src="../../static/js/bootstrap.min.js" th:src="@{/static/js/bootstrap.min.js}" type="text/javascript"></script>
<!-- Icons -->
<script src="../../static/js/feather.min.js" th:src="@{/static/js/feather.min.js}" type="text/javascript"></script>
<script>
    feather.replace()
</script>
<!-- Graphs -->
<script src="../../static/js/Chart.min.js" th:src="@{/static/js/Chart.min.js}" type="text/javascript"></script>
<script>
    /*
    let classTeacher='[[${classTeacherList}]]';
    */
</script>

</body>

</html>